package com.tian.scroll.gesture;

import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;
import androidx.navigation.NavController;
import androidx.navigation.Navigation;
import androidx.navigation.ui.AppBarConfiguration;
import androidx.navigation.ui.NavigationUI;

import android.os.Bundle;

import com.tian.scroll.R;
import com.tian.scroll.databinding.ActivityGestureDetectorBinding;

/**
 * @author tiansongtao, Email:769001510@qq.com, created on 2021/1/19 14:37
 *
 * Android 手势识别
 */
public class GestureDetectorActivity extends AppCompatActivity {

    private ActivityGestureDetectorBinding b;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        b = DataBindingUtil.setContentView(this, R.layout.activity_gesture_detector);

        AppBarConfiguration appBarConfiguration = new AppBarConfiguration.Builder(
                R.id.tab_single_gesture, R.id.tab_scale_gesture, R.id.tab_custom_gesture)
                .build();

        NavController controller = Navigation.findNavController(this, R.id.gesture_nav_host_fragment);
        NavigationUI.setupActionBarWithNavController(this, controller, appBarConfiguration);
        NavigationUI.setupWithNavController(b.navView, controller);

    }
}